home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 483 / mkrscsrc / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-29  |  1.6 KB  |  70 lines

  1. #include "stdio.h"
  2. #include "gemdefs.h"
  3. #include "obdefs.h"
  4. #include "osbind.h"
  5. #include "mkrsc.h"
  6.  
  7. #define  extern
  8. #include "globals.h"
  9. #undef   extern
  10.  
  11.  
  12. main()
  13.  
  14. {
  15.     int i, c, dummy, button;
  16.  
  17.         gl_apid = appl_init();
  18.  
  19.         rez = Getrez();       /* get the screen resolution   */
  20.         if(rez == 0)
  21.         {    button = form_alert(1, "[1][ Sorry....    | Need medium or high resolution. ][OK]");
  22.         shutdown(2);
  23.         }      
  24.  
  25.         handle = open_workstation(&source);
  26.         
  27.         set_clip(xdesk,ydesk,wdesk,hdesk); /* set_clip to desktop */
  28.         /* set text alignment to bottom left */
  29.            vst_alignment(handle,0,3,&dummy,&dummy);
  30.         graf_mouse(0,0x0L);   /* set mouse to arrow */
  31.         v_show_c(handle,0);   /* reset visibility */
  32.         cursor(0,10);         /* put the vt52 cursor at line 10 */
  33.  
  34.  
  35.     init();
  36.     init_path();    /* initialize fs_inpath with current path */
  37.  
  38.  
  39. /*    build a new desktop    */
  40.  
  41.     create_newtops();
  42.     wind_set(0,WF_NEWDESK,hightreadr,lowtreadr, 0);
  43.  
  44.     draw_obj(treicont);
  45.     onleft = treicont;
  46.  
  47.     mkrscmnu[CUT].ob_state = DISABLED;
  48.     mkrscmnu[COPY].ob_state = DISABLED;
  49.     mkrscmnu[ERASE].ob_state = DISABLED;
  50.     mkrscmnu[PASTE].ob_state = DISABLED;
  51.     mkrscmnu[NAM].ob_state = DISABLED;
  52.  
  53.    /* draw the menu bar   */
  54.     menu_bar(mkrscmnu,TRUE);
  55.        
  56.   /* go to the event_multi handler   */
  57.    TaskMaster();
  58.   /* should never reach here!  */ 
  59.     shutdown(0);                 /* quit  */
  60. }
  61.  
  62. clear()       { Bconout(2,27); Bconout(2,'E'); }
  63.  
  64. cursor(x,y)   /* position the cursor*/
  65.         int x,y;
  66.   {     Bconout(2,27); Bconout(2,'Y');
  67.         Bconout(2,(32 + y)); Bconout(2,(32 + x));
  68.   }
  69.  
  70.